﻿using System.Collections.Generic;
using BCCommon;
using BCCommon.Enums;
using BCDto.Common.NotificationMessageRecord;
using BCDto.Sim.Admin.Admin;
using BCDto.Website.User;

namespace BCService.Common.NotificationMessageRecord
{
    /// <summary>
    /// 通知消息记录
    /// </summary>
    public interface INotificationMessageRecordService
    {
        /// <summary>
        /// 获取通知消息
        /// </summary>
        /// <param name="notificationMessageId">通知消息Id</param>
        /// <returns></returns>
        NotificationMessageRecordDto GetNotificationMessageRecord(long notificationMessageId);

        PageableList<NotificationMessageRecordDto> GetPageableList(AdminDto admin, UserDto user, bool? isRead, NotificationMessageRecordType? notificationMessageRecordType, int pageIndex, int pageSize);

        /// <summary>
        /// 获取未读任务总数
        /// </summary>
        /// <returns></returns>
        int GetUnreadCount(AdminDto admin, UserDto user);

        IEnumerable<NotificationGroupMessageCountDto> GetGroupUnreadCount(AdminDto admin, UserDto user);

        /// <summary>
        /// 添加通知消息记录
        /// </summary>
        /// <param name="requestDto">通知消息记录信息</param>
        /// <returns></returns>
        NotificationMessageRecordDto Create(NotificationMessageRecordRequestDto requestDto);




        /// <summary>
        /// 修改消息读取状态
        /// </summary>
        /// <param name="notificationMessageId">通知消息Id</param>
        /// <returns></returns>
        NotificationMessageRecordDto UpdateReadStatus(long notificationMessageId);

        /// <summary>
        /// 一键更改消息读取状态
        /// </summary>
        /// <param name="adminDto">管理员信息</param>
        /// <param name="notificationMessageRecordType">通知消息记录类型</param>
        /// <returns></returns>
        bool UpdateBatchIsRead(AdminDto adminDto, NotificationMessageRecordType? notificationMessageRecordType);

        /// <summary>
        /// 更新通知消息为已处理
        /// </summary>
        /// <param name="adminDto">管理员信息</param>
        /// <param name="notificationMessageId">通知消息Id</param>
        /// <param name="handledRemark">处理备注</param>
        /// <returns></returns>
        NotificationMessageRecordDto UpdateIsHandled(AdminDto adminDto, long notificationMessageId, string handledRemark);
    }
}
